package cqut.gbq.qimo.service.impl;

import cqut.gbq.qimo.entity.Record;
import cqut.gbq.qimo.entity.ResBean;
import cqut.gbq.qimo.mapper.RecordMapper;
import cqut.gbq.qimo.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author leo
 * @create 2021-06-2116:36
 */
@Service
public class RecordServiceImpl implements RecordService {

    @Autowired
    private RecordMapper recordMapper;

    @Override
    public ResBean insertRecord(Record record) {
        Integer integer = recordMapper.insertRecord(record);
        if (integer > 0){
            return ResBean.success("加入成功");
        }else{
            return ResBean.error("加入失败!");
        }
    }
}
